package com.ciwong.epaper.util;

import java.text.DecimalFormat;

/**
 * Created by young on 2016/12/2.
 */
public class PayUtil {

    /**
     * 保留小数点
     *
     * @param value
     *            输入值
     * @param point
     *            保留的小数点
     * @return
     */
    public static String radixPoint(double value, int point)
    {
        String str = "";
        for (int i = 0; i < point; i++)
        {
            if (i == 0)
            {
                str += ".";
            }
            str += "0";
        }
        str = "##0" + str;
        DecimalFormat fnum = new DecimalFormat(str);
        String dd = fnum.format(value);
        return dd;
    }
}
